Skip to content

Instantly share code, notes, and snippets.

set -ex
sudo apt-get build-dep libmemcached-tools
wget https://launchpad.net/libmemcached/1.0/1.0.18/+download/libmemcached-1.0.18.tar.gz
tar zxvf libmemcached-1.0.18.tar.gz
cd libmemcached-1.0.18/
LDFLAGS='-lpthread' CXXFLAGS='-fpermissive' CFLAGS='-Wno-errors -fpermissive' ./configure --enable-memaslap --with-pthread=yes
make -j12
sudo make install
sudo ldconfig
@coolaj86
coolaj86 / Create a Bootable MacOS Recovery USB with Linux.md
Last active June 26, 2025 23:26
How to create Apple's Bootable MacOS Rescue Image from Linux

See bootableinstaller.com

How to create a Bootable MacOS Recovery USB from Linux

If your Mac is out-of-order or you otherwise cannot download macOS from the App Store, you can still create a bootable OS X recovery USB, and you can use that to create an Installer USB.

The downloads used in this process are legal and freely avaliable - including disk images directly from Apple's IT support pages, and open source utilities for extracting and converting pkg, dmg, and HFS+.

@pmogollons
pmogollons / extraerCedulaColombiana.js
Last active June 26, 2025 23:25
Función para extraer los datos del codigo de barras PDF417 de una cedula colombiana usando React Native Camera en Javascript
import moment from 'moment';
export function extractColDocumentData(data) {
let dataString = data.barcodes[0]?.data.replaceAll('�', ' ');
if (!dataString.includes('PubDSK_1')) {
throw new Error('Invalid barcode data, only PubSub_1 is supported');
}
@Mayyhem
Mayyhem / Get-SiteServerCurrentUser.ps1
Last active June 26, 2025 23:19
Query SCCM site server remote registry for the currently logged on user account
function Get-SiteServerCurrentUser {
[CmdletBinding()]
param(
[Parameter(Mandatory=$true)]
[string]$ComputerName,
[Parameter(Mandatory=$false)]
[string]$SubKeyPath = "SOFTWARE\Microsoft\SMS\CurrentUser"
)
@nikcub
nikcub / README.md
Created October 4, 2012 13:06
Facebook PHP Source Code from August 2007
@MarioHewardt
MarioHewardt / enable_ebpf_on_wsl2
Last active June 26, 2025 23:13
Enable EBPF on WSL2
By default, EBPF programs will not run on WSL2 due to required kernel modules missing. The following example error is an
indication of this problem:
modprobe: ERROR: ../libkmod/libkmod.c:586 kmod_search_moddep() could not open moddep file '/lib/modules/4.19.84-microso
ft-standard/modules.dep.bin'
modprobe: FATAL: Module kheaders not found in directory /lib/modules/4.19.84-microsoft-standard
chdir(/lib/modules/4.19.84-microsoft-standard/build): No such file or directory
To fix this you need to rebuild the WSL2 kernel with the missing kernel modules. The below instructions are for Ubuntu 18.04 WSL2.
1. git clone https://github.com/microsoft/WSL2-Linux-Kernel.git
@Myndex
Myndex / GitHubFlavoredMarkdown.md
Last active June 26, 2025 23:13 — forked from joshuapekera/markdown
GitHub Flavored Markdown Cheat Sheet
@ap29600
ap29600 / primer.txt
Created June 26, 2025 21:28
a couple notes on the codebase of growler/k
not yet described in this note: memory management, parsing, bytecode, printing
C types
[UW] [48]byte unsigned
[GHIL] [1248]byte int
C 1-byte char
S string
F 8-byte double
A generic value
A[1234] A (*f)(A x[, A y[, A z[, ...]]])
@thiagokokada
thiagokokada / LEIAME.md
Last active June 26, 2025 23:05
[Vivo Fibra] Usando RTF3507VW-N1 em modo bridge

[Vivo Fibra] Usando RTF3507VW-N1 em modo bridge

Por que usar o RTF3507VW-N1 em modo bridge?

O roteador Askey RTF3507VW-N1 fornecido pela Vivo tem vários problemas:

  • Existe um cache interno de DNS (usando o dnsmasq?) bugado: ao fazer a mesma requisição DNS duas vezes seguidas, a primeira resposta vem correta, porém na seguinte temos:
@LuisAlejandro
LuisAlejandro / .env
Last active June 26, 2025 23:05
Docker Hub Untagged Image Cleanup Script
DH_USERNAME=
DH_PASSWORD=
DOCKER_HUB_COOKIE=""